import { UnitConfig } from "../types/L_Type";

export const UnitBaseAttrConfig:Record<string,UnitConfig>  ={
    'A001':{
        name:"山丘Neo",
        lvl:2,
        attrs:{
            cri:1
        },
        dtRes:{nothing:2}
    }
    
    
}


const relCache:Map<string,string>=new Map()

export function cacheOfUnitNameRel(name:string):string{
    if(relCache.size==0){
        Object.entries(UnitBaseAttrConfig).forEach(([key, value]) => {
            relCache.set(value.name,key);
        });
    }
    return relCache.get(name)!
}